home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 1 / MacMania 1.toast / Educational / Education'More / D-G / Guided Reading.sea / Guided Reading / stack_-1.xml < prev   
Extensible Markup Language  |  1992-02-08  |  12KB  |  30 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>6</cardCount>
  7.     <cardID>4038</cardID>
  8.     <listID>3243</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><true /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû Script info for this stack. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àûHANDLERS:  openStack,closeStack,suspendStack,resumeStack,run,findGloss,--         doInstructorStuff,instructorMenu,changePassword,--         showGroups,hideGroups,makeGroup,ungroup,glossIt,--         doMenu,show,idle,textSelectionError,gray,hot,--         getTitle,helpMe,hideMyHelp,mouseEnter,mouseLeave,--         mouseDownInPicture,videoFUNCTIONS:GLOBALS:   authoring,abbreviations,punctuations,bubblehelp,title,playerSize: 10758 chars.      1:46 PM, Wednesday, November 20, 1991‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû ¬© 1991 David Herren ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû---------------------------General Handlers----------------------------on openStackglobal authoring, abbreviations, punctuations, bubblehelpset cursor to watchgo first--test for version 2.0v2 or laterif the long version < 02018000 thenanswer "This stack requires HyperCard 2.0v2 or later." with "Sorry"go homeend if--set initial protection against prying studentshide menuBarhide msgset cantabort of this stack to "true"set cantPeek of this stack to "true"put "false" into authoringset userlevel to 2set usermodify to falseset cantModify of this stack to trueset blindtyping to falseput "false" into bubblehelpsend getTitle to this cd--get the known abbreviations from a hidden field on first cardput cd fld "abbreviations" into abbreviations--get the known punctuation from a hidden field on the first cardput cd fld "punctuations" into punctuations--check to see if we are authoring and kill protectionanswer "Please select one of the following..."¬¨with "Instructor" or "Student"if it is "Instructor" thenask password "What is the authoring password?"if it is cd fld "password" then doInstructorStuffend ifpicture "About Guided Reading",resource,dialog,true,1pass openStackend openStackon closeStackif there is a menu "GR Instructor" then delete menu "GR Instructor"if the freesize of this stack > (.15 * the size of this stack)¬¨and not the cantModify of this stack thendoMenu "compact stack"end ifreset menubarpass closeStackend closeStackon suspendStackif there is a menu "GR Instructor" then disable menu "GR Instructor"end suspendStackon resumeStackif there is a menu "GR Instructor" then enable menu "GR Instructor"end resumeStack--for resetting the stackon rungo to first cdsend openstack to first cdend run---------------------------Student Handlers-----------------------------searches the glossary for string passed to iton findGloss theTextpush cdhide msglock screenset lockmessages to truego cd "glossary" of bg "plain"find whole theTextif the short name of this cd is not "glossary"¬¨or the result is "Not found" thenpop cdanswer "Sorry, no glossary entry exists for:" & return¬¨& "‚Äú" & theText & "‚Äù."set lockmessages to falseexit to HyperCardend ifset lockmessages to falsesend "opencard" to this cardend findGloss-----------------------Instructor Handlers-----------------------------on doInstructorStuffglobal authoringput "true" into authoringset userlevel to 5set cantModify of this stack to falseset blindtyping to trueset cantabort of this stack to "false"set cantPeek of this stack to "false"instructorMenuif "Objects" is in the menus then delete menu "Objects"show menubaranswer "If you are beginning a new ‚ÄúGuided Reading‚Äù lesson,"¬¨&& "be sure to make a copy of this original." with "Copy it" or "Just Looking"if it is "Copy it" thenask "Please name the NEW Guided Reading lesson."if it is not empty thenput it into newNameset cursor to watchput "Now saving the original..."put the short name of this stack into origNameset name of this stack to newNamesave stack the short name of this stack as origNameif the result is not empty thenanswer "Error:" && the result & return & "Let's start again."send "run" to this cardend ifput emptyhide msgend ifend ifend doInstructorStuffon instructorMenuif "GR Instructor" is in the menus then delete menu "GR Instructor"create menu "GR Instructor"put "Extract Vocabulary" into menu "GR Instructor" with menumsg "extractVocab"put "Extract Sentences" after menu "GR Instructor" with menumsg "extractSentences"if the short name of this bg is not "main text" thendisable menuItem "Extract Vocabulary" of menu "GR Instructor"disable menuItem "Extract Sentences" of menu "GR Instructor"end ifput "-" after menu "GR Instructor"put "Gloss the Selection" after menu "GR Instructor" with menuMsg "glossIt"put "-" after menu "GR Instructor"put "Group Text" after menu "GR Instructor" with menuMsg "makeGroup"put "Ungroup Text" after menu "GR Instructor" with menuMsg "ungroup"put "Show Groups" after menu "GR Instructor" with menuMsg "showGroups"put "Hide Groups" after menu "GR Instructor" with menuMsg "hideGroups"hidegroupsput "-" after menu "GR Instructor"put "Change Password" after menu "GR Instructor" with menuMsg "changePassword"put "-" after menu "GR Instructor"put "Re-set the lesson" after menu "GR Instructor" with menuMsg "run"end instructormenuon changePasswordask password "Please enter the current password."if it is not cd fld "password" of cd 1 then exit to hypercardrepeatask password "What is the new password?"if it is empty then exit changePasswordput it into password1ask password "Please type it again to make sure I have it."if it is not password1 thenanswer "Oops, try again."next repeatelse if it is password1 thenanswer "Are you sure you want to do this?" with "Yes" or "No!"if it is "yes" then put password1 into cd fld "password" of cd 1exit repeatend ifend repeatend changePasswordon showGroupsshow groupsenable menuitem "Hide Groups" of menu "GR Instructor"disable menuitem "Show Groups" of menu "GR Instructor"end showGroupson hideGroupshide groupsenable menuItem "Show Groups" of menu "GR Instructor"disable menuItem "Hide Groups" of menu "GR Instructor"end hideGroupson makeGroupif the selection is empty then textSelectionErrorelse set textstyle of the selectedchunk to "group"end makeGroupon ungroupif the selection is empty then textSelectionErrorelse set textStyle of the selectedchunk to "plain"end ungroupon glossItput the selectedText into theGlossmakegrouplock screenpush cdgo to cd "glossary" of bg "plain"find theGlossif the foundline is empty or the short name of this cd is not "glossary" thengo to cd "glossary" of bg "plain"put return & theGloss & ": " after cd fld "glossary"send mouseUp to btn "unlock glossary"unlock screenselect after last char of cd fld "glossary"elseput the foundline into theLinesend mouseUp to btn "unlock glossary"unlock screenselect after theLineend ifend glossIt-------------------------Protection Handlers---------------------------on doMenu whichglobal authoringif which is "Message" and not authoring thenbeephide msgelse pass doMenuend doMenuon show whatglobal authoringif not authoring and (what is "Message" or what is "MenuBar") then beepelse pass showend showon idleglobal authoring, bubblehelpif not authoring then hide menuBarif bubblehelp then changeCurs(15998)pass idleend idle----------------------------Utility Handlers---------------------------on textSelectionErrorbeepanswer "Oops‚Äîyou need to select some text first!"exit to hyperCardend textSelectionError--gray & hot change font of cd/bg btns passed--w/ at least 2 parameters: [cd, bg, icon],[short name of btn]on grayif param(1) is not "icon" thenrepeat with count = 2 to the paramCountdo "set textFont of" && param(1) && "btn" && quote & param(count)¬¨& quote && "to" && quote & "disabled" & quoteend repeatelserepeat with count = 2 to the paramCountset icon of param(count) to (the icon of param(count)) * -1end repeatend ifend grayon hotif param(1) is not "icon" thenrepeat with count = 2 to the paramCountdo "set textFont of" && param(1) && "btn" && quote & param(count)¬¨& quote && "to" && quote & "chicago" & quoteend repeatelserepeat with count = 2 to the paramCountset icon of param(count) to (the icon of param(count)) * -1end repeatend ifend hoton getTitleglobal title--get the title of the text to use elsewhere & delete returnsput word 1 to the number of words of fld "title/quote"¬¨of fld "title/quote" into titleput replace(return,space,title) into titleend getTitle----------------------------Help Handlers-------------------------------on helpMe withWhatput the mouseLoc into wherepicture withWhat,resource,shadow,false,1if there is not a window withWhat then exit helpMeif where is within "0,0,256,171" then show window withWhat at item 1 of where + 10,item 2 of where + 10else if where is within "256,0,512,171" then show window withWhat at item 1 of where -200,item 2 of where + 10else if where is within "0,171,256,342" then show window withWhat at item 1 of where + 10,item 2 of where - 100else if where is within "256,171,512,342" then show window withWhat at item 1 of where - 200,item 2 of where - 70end helpMeon hideMyHelp theWindowif there is a window theWindow then close window theWindowend hideMyHelpon mouseEnterglobal bubblehelpif bubblehelp then helpMe the short name of the targetend mouseEnteron mouseLeaveglobal bubblehelpif bubblehelp thenhideMyHelp the short name of the targetchangecurs(15998)end ifend mouseLeaveon mouseDownInPicture theWindowclose window theWindowend mouseDownInPicture--------------------------Sound & Video Handlers--------------------on videoglobal playerput the params into commandput player into word 1 of commandif the optionKey is "down" then put command    --lets you see what's being sent outdo commandend video-----------------------------Compiled Handlers--------------------------these scripts are compiled in the release version-- --removes the characters passed to it from text-- function stripChars theChars,theText-- repeat with count = 1 to the number of chars of theChars-- put char count of theChars into currChar-- repeat while offset(currChar,theText) <> 0-- put empty into char offset(currChar,theText) of theText-- end repeat-- end repeat-- return theText-- end stripChars-- --for replacing chars. Used in extractVocab & elsewhere-- function replace what, with, where-- repeat while what is in where-- put with into char offset(what, where) of where-- end repeat-- return where-- end replace-- --used to set checkmark in pop up menus-- function currentSel theSelection,theMenu-- repeat with count = 1 to the number of items of theMenu-- if theSelection is item count of theMenu-- then return count-- end repeat-- end currentSel</script>
  17.     <background id="2125" file="background_2125.xml" name="sentences" />
  18.     <background id="2330" file="background_2330.xml" name="plain" />
  19.     <background id="2705" file="background_2705.xml" name="main text" />
  20.     <background id="3833" file="background_3833.xml" name="title" />
  21.     <background id="6378" file="background_6378.xml" name="video" />
  22.     <background id="6869" file="background_6869.xml" name="sound" />
  23.     <card id="4038" file="card_4038.xml" marked="false" name="Title" owner="3833" />
  24.     <card id="3349" file="card_3349.xml" marked="false" name="First Text Card" owner="2705" />
  25.     <card id="8091" file="card_8091.xml" marked="false" name="" owner="2125" />
  26.     <card id="6088" file="card_6088.xml" marked="false" name="Sound" owner="6869" />
  27.     <card id="5526" file="card_5526.xml" marked="false" name="video" owner="6378" />
  28.     <card id="4583" file="card_4583.xml" marked="false" name="glossary" owner="2330" />
  29. </stack>
  30.